import { defineStore } from 'pinia';

export const useThemeStore = defineStore('theme', {
    state: () => ({
        themes: JSON.parse(localStorage.getItem('themes') || '{}')
    }),
    actions: {
        setPrimaryColor(theme) {
            this.themes = theme;
            localStorage.setItem('themes', JSON.stringify(this.themes));
        }
    }
});

export default useThemeStore;